package com.jht.bletool2java.util;

import android.bluetooth.BluetoothGattCharacteristic;
import android.util.Log;

import java.util.List;

public class CheckUtil {
    private static final String TAG = "CheckUtil";

    public static void isNoNull(String info,Object... obj){
        if(obj == null){
            throw new NullPointerException("obj = null; detail=> " + info);
        }
        for(Object o:obj){
            if(o == null){
                throw new NullPointerException("o = null; detail=> " + info);
            }else {
                Log.d(TAG, o+"isNoNull: ");
            }
        }
    }

    public static boolean isNoNullShowTip(String s, Object... obj) {
        try{
            isNoNull(s,obj);
        }catch (NullPointerException e){
            return false;
        }
        return true;
    }

}
